home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / perl.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  24KB  |  794 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <MODE>
  6.     <PROPS>
  7.         <PROPERTY NAME="lineComment" VALUE="#" />
  8.         <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  9.         <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  10.         <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
  11.         <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
  12.         <PROPERTY NAME="indentNextLine" VALUE="[^#]*\.\s*$" />
  13.     </PROPS>
  14.  
  15.     <!-- no ESCAPE char because we need the backslash for references -->
  16.     <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
  17.         <!-- Comments -->
  18.         <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
  19.  
  20.         <!-- TYPE is LABEL so that =head1 and =cut are highlighted as so -->
  21.         <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
  22.             <BEGIN>=head1</BEGIN>
  23.             <END>=cut</END>
  24.         </SPAN>
  25.         <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
  26.             <BEGIN>=head2</BEGIN>
  27.             <END>=cut</END>
  28.         </SPAN>
  29.         <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
  30.             <BEGIN>=head3</BEGIN>
  31.             <END>=cut</END>
  32.         </SPAN>
  33.         <SPAN  AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
  34.             <BEGIN>=head4</BEGIN>
  35.             <END>=cut</END>
  36.         </SPAN>
  37.         <SPAN TYPE="LABEL"  AT_LINE_START="TRUE" DELEGATE="POD">
  38.             <BEGIN>=item</BEGIN>
  39.             <END>=cut</END>
  40.         </SPAN>
  41.         <SPAN  AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
  42.             <BEGIN>=over</BEGIN>
  43.             <END>=cut</END>
  44.         </SPAN>
  45.         <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
  46.             <BEGIN>=back</BEGIN>
  47.             <END>=cut</END>
  48.         </SPAN>
  49.         <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
  50.             <BEGIN>=pod</BEGIN>
  51.             <END>=cut</END>
  52.         </SPAN>
  53.         <SPAN TYPE="LABEL" DELEGATE="POD"  AT_LINE_START="TRUE">
  54.             <BEGIN>=for</BEGIN>
  55.             <END>=cut</END>
  56.         </SPAN>
  57.         <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
  58.             <BEGIN>=begin</BEGIN>
  59.             <END>=cut</END>
  60.         </SPAN>
  61.         <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
  62.             <BEGIN>=end</BEGIN>
  63.             <END>=cut</END>
  64.         </SPAN>
  65.  
  66.         <!-- Some other things that confuse the mode file. -->
  67.         <SEQ TYPE="OPERATOR">*"</SEQ>
  68.         <SEQ TYPE="OPERATOR">*'</SEQ>
  69.         <SEQ TYPE="OPERATOR">&"</SEQ>
  70.         <SEQ TYPE="OPERATOR">&'</SEQ>
  71.  
  72.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  73.             <BEGIN>${</BEGIN>
  74.             <END>}</END>
  75.         </SPAN>
  76.  
  77.         <!-- Scalar variables -->
  78.         <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  79.  
  80.         <!-- Array variables -->
  81.         <SEQ_REGEXP HASH_CHAR="@" TYPE="KEYWORD2">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  82.  
  83.         <!-- Associative Array (= Hash) variables -->
  84.         <SEQ_REGEXP HASH_CHAR="%" TYPE="KEYWORD2">%((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  85.  
  86.         <!-- Dereferences -->
  87.         <SEQ_REGEXP HASH_CHAR="$$" TYPE="KEYWORD4">\$\$+((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  88.         <SEQ_REGEXP HASH_CHAR="@$" TYPE="KEYWORD4">@\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  89.         <SEQ_REGEXP HASH_CHAR="%$" TYPE="KEYWORD4">%\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  90.         <SEQ_REGEXP HASH_CHAR="*" TYPE="KEYWORD4">\*((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  91.  
  92.         <!-- Perl predefined variables -->
  93.         <SEQ_REGEXP HASH_CHAR="$^" TYPE="KEYWORD2">\$\^\p{Alpha}</SEQ_REGEXP>
  94.         <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$\p{Punct}</SEQ_REGEXP>
  95.  
  96.         <!-- references to vars and code, starting with a backslash -->
  97.         <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD4">\\[@%\$&]((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  98.  
  99.         <!-- complex code dereference -->
  100.         <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
  101.             <BEGIN>&{</BEGIN>
  102.             <END>}</END>
  103.         </SPAN>
  104.  
  105.         <!-- Function calls from variables -->
  106.         <SEQ_REGEXP HASH_CHAR="&$" TYPE="FUNCTION">&\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  107.  
  108.         <!-- Highlight calls to subs that contain ' in the name. -->
  109.         <SEQ_REGEXP HASH_CHAR="&" TYPE="FUNCTION"
  110.         >&\p{Alpha}[\p{Alnum}_]*'\p{Alpha}[\p{Alnum}_]*</SEQ_REGEXP>
  111.  
  112.         <!-- Literals -->
  113.         <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
  114.             <BEGIN>"</BEGIN>
  115.             <END>"</END>
  116.         </SPAN>
  117.  
  118.         <!-- apostrophe literals -->
  119.         <SPAN TYPE="LITERAL1" DELEGATE="APOSTR">
  120.             <BEGIN>'</BEGIN>
  121.             <END>'</END>
  122.         </SPAN>
  123.         <SEQ_REGEXP TYPE="LITERAL1">\b\w+\b(?=\s*=>)</SEQ_REGEXP>
  124.  
  125.         <!-- options: -text -->
  126.         <SEQ_REGEXP HASH_CHAR="-" TYPE="LITERAL1">-[\p{Lower}]\w+</SEQ_REGEXP>
  127.  
  128.         <!-- file stat expressions -->
  129.         <SEQ_REGEXP HASH_CHAR="-" TYPE="KEYWORD3">-[\p{Lower}]</SEQ_REGEXP>
  130.  
  131.         <!-- non-quoted literals in hashes -->
  132.         <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" NO_LINE_BREAK="TRUE" DELEGATE="LITERAL">
  133.             <BEGIN>\{(?=\s*[\p{Alpha}_\-][\p{Alnum}_]*\s*\})</BEGIN>
  134.             <END>}</END>
  135.         </SPAN_REGEXP>
  136.  
  137.         <!-- Code blocks. This is a hack to correctly highlight some
  138.              complex expressions that can have arbitrary perl code
  139.              inside brackets (like array deferences below). Declaring
  140.              this *before* the other rules is needed to maintain
  141.              correct bracket matching.
  142.         -->
  143.         <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
  144.             <BEGIN>{</BEGIN>
  145.             <END>}</END>
  146.         </SPAN>
  147.  
  148.         <!-- Array dereference -->
  149.         <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
  150.             <BEGIN>@{</BEGIN>
  151.             <END>}</END>
  152.         </SPAN>
  153.  
  154.         <!-- Hash dereference -->
  155.         <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
  156.             <BEGIN>%{</BEGIN>
  157.             <END>}</END>
  158.         </SPAN>
  159.  
  160.         <!-- labels, catches also package prefixes at line start :( -->
  161.         <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
  162.  
  163.         <!-- __DATA__ and similar -->
  164.         <SEQ_REGEXP HASH_CHAR="__" TYPE="KEYWORD4">__\w+__</SEQ_REGEXP>
  165.  
  166.         <!-- Exec -->
  167.         <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
  168.             <BEGIN>`</BEGIN>
  169.             <END>`</END>
  170.         </SPAN>
  171.  
  172.         <!-- file globs / IO operators -->
  173.         <SEQ_REGEXP HASH_CHAR="<" TYPE="KEYWORD4"><[\p{Punct}\p{Alnum}_]*></SEQ_REGEXP>
  174.  
  175.         <!-- Heredoc -->
  176.         <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
  177.         <BEGIN><![CDATA[<<\p{Space}*(['"])([\p{Space}\p{Alnum}_]*)\1;?\s*]]></BEGIN>
  178.         <END AT_LINE_START="TRUE">$2</END>
  179.         </SPAN_REGEXP>
  180.         <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
  181.         <BEGIN><![CDATA[<<([\p{Alpha}_][\p{Alnum}_]*);?\s*]]></BEGIN>
  182.         <END AT_LINE_START="TRUE">$1</END>
  183.         </SPAN_REGEXP>
  184.  
  185.         <!-- jEdit 4.1 adds regular expression syntax rules so we can
  186.              highlight this sort of crap. -->
  187.  
  188.         <!-- /Regexp/, avoid confusion with a sequence of two divisions! -->
  189.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/"
  190.             AT_WORD_START="TRUE">/.*?[^\\]/([cgimosx]+\b|(?=[^cgimosx])|$)(?!\s*[\d\$\@\(\{\-A-Z"'])</SEQ_REGEXP>
  191.  
  192.         <!-- q//, qq//, qx// -->
  193.         <SPAN_REGEXP HASH_CHAR="q"
  194.                      TYPE="LITERAL1"
  195.                      ESCAPE="\"
  196.                      MATCH_TYPE="OPERATOR"
  197.                      AT_WORD_START="TRUE"
  198.                      NO_LINE_BREAK="FALSE">
  199.             <BEGIN>q[qxw]?([#/\|!])</BEGIN>
  200.             <END>~1</END>
  201.         </SPAN_REGEXP>
  202.         <SPAN_REGEXP HASH_CHAR="q"
  203.                      MATCH_TYPE="OPERATOR"
  204.                      DELEGATE="QUOTED_BRACKET"
  205.                      AT_WORD_START="TRUE"
  206.                      NO_LINE_BREAK="FALSE">
  207.             <BEGIN>q[qxw]?(\[)</BEGIN>
  208.             <END>~1</END>
  209.         </SPAN_REGEXP>
  210.         <SPAN_REGEXP HASH_CHAR="q"
  211.                      MATCH_TYPE="OPERATOR"
  212.                      DELEGATE="QUOTED_BRACE"
  213.                      AT_WORD_START="TRUE"
  214.                      NO_LINE_BREAK="FALSE">
  215.             <BEGIN>q[qxw]?(\{)</BEGIN>
  216.             <END>~1</END>
  217.         </SPAN_REGEXP>
  218.         <SPAN_REGEXP HASH_CHAR="q"
  219.                      MATCH_TYPE="OPERATOR"
  220.                      DELEGATE="QUOTED_PAREN"
  221.                      AT_WORD_START="TRUE"
  222.                      NO_LINE_BREAK="FALSE">
  223.             <BEGIN>q[qxw]?(\()</BEGIN>
  224.             <END>~1</END>
  225.         </SPAN_REGEXP>
  226.  
  227.         <!-- qr// should match other regex highlight colors -->
  228.         <SPAN_REGEXP HASH_CHAR="q"
  229.                      ESCAPE="\"
  230.                      TYPE="LITERAL1"
  231.                      MATCH_TYPE="OPERATOR"
  232.                      AT_WORD_START="TRUE"
  233.                      NO_LINE_BREAK="FALSE">
  234.             <BEGIN>qr([#/\|!])</BEGIN>
  235.             <END>~1</END>
  236.         </SPAN_REGEXP>
  237.         <SPAN_REGEXP HASH_CHAR="q"
  238.                      DELEGATE="QUOTED_BRACKET"
  239.                      MATCH_TYPE="OPERATOR"
  240.                      AT_WORD_START="TRUE"
  241.                      NO_LINE_BREAK="FALSE">
  242.             <BEGIN>qr(\[)</BEGIN>
  243.             <END>~1</END>
  244.         </SPAN_REGEXP>
  245.         <SPAN_REGEXP HASH_CHAR="q"
  246.                      DELEGATE="QUOTED_BRACE"
  247.                      MATCH_TYPE="OPERATOR"
  248.                      AT_WORD_START="TRUE"
  249.                      NO_LINE_BREAK="FALSE">
  250.             <BEGIN>qr(\{)</BEGIN>
  251.             <END>~1</END>
  252.         </SPAN_REGEXP>
  253.         <SPAN_REGEXP HASH_CHAR="q"
  254.                      DELEGATE="QUOTED_PAREN"
  255.                      ESCAPE="\"
  256.                      MATCH_TYPE="OPERATOR"
  257.                      AT_WORD_START="TRUE"
  258.                      NO_LINE_BREAK="FALSE">
  259.             <BEGIN>qr(\()</BEGIN>
  260.              <END>~1</END>
  261.          </SPAN_REGEXP>
  262.  
  263.         <!-- tr/// transliteration -->
  264.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
  265.             AT_WORD_START="TRUE">tr\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
  266.  
  267.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
  268.             AT_WORD_START="TRUE">tr([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
  269.  
  270.         <!-- y/// translation -->
  271.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
  272.             AT_WORD_START="TRUE">y\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
  273.  
  274.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
  275.             AT_WORD_START="TRUE">y([^\p{Alnum}\p{Space}\}_])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
  276.  
  277.         <!-- m// regular expression matching -->
  278.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
  279.             AT_WORD_START="TRUE">m\s*\{.*?[^\\]\}[cgimosx]*</SEQ_REGEXP>
  280.  
  281.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
  282.             AT_WORD_START="TRUE">m([^\p{Alnum}\p{Space}\}])(?:.*?[^\\])\1[cgimosx]*</SEQ_REGEXP>
  283.  
  284.         <!-- s/// regular expression substitution -->
  285.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
  286.             AT_WORD_START="TRUE">s\s*\{.*?\}\s*\{.*?\}[egimosx]*</SEQ_REGEXP>
  287.  
  288.         <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
  289.             AT_WORD_START="TRUE">s([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[egimosx]*</SEQ_REGEXP>
  290.  
  291.         <!-- complex operators -->
  292.         <SEQ TYPE="OPERATOR">||</SEQ>
  293.         <SEQ TYPE="OPERATOR">//</SEQ>
  294.         <SEQ TYPE="OPERATOR">&&</SEQ>
  295.         <SEQ TYPE="OPERATOR">!=</SEQ>
  296.         <SEQ TYPE="OPERATOR"><=></SEQ>
  297.         <SEQ TYPE="OPERATOR">-></SEQ>
  298.         <SEQ TYPE="OPERATOR">=></SEQ>
  299.         <SEQ TYPE="OPERATOR">==</SEQ>
  300.         <SEQ TYPE="OPERATOR">=~</SEQ>
  301.         <SEQ TYPE="OPERATOR">!~</SEQ>
  302.         <SEQ TYPE="OPERATOR">~~</SEQ>
  303.  
  304.         <SEQ TYPE="OPERATOR">+=</SEQ>
  305.         <SEQ TYPE="OPERATOR">-=</SEQ>
  306.         <SEQ TYPE="OPERATOR">/=</SEQ>
  307.         <SEQ TYPE="OPERATOR">*=</SEQ>
  308.         <SEQ TYPE="OPERATOR">.=</SEQ>
  309.         <SEQ TYPE="OPERATOR">%=</SEQ>
  310.  
  311.         <SEQ TYPE="OPERATOR">&=</SEQ>
  312.         <SEQ TYPE="OPERATOR">|=</SEQ>
  313.         <SEQ TYPE="OPERATOR">**=</SEQ>
  314.         <SEQ TYPE="OPERATOR"><<=</SEQ>
  315.         <SEQ TYPE="OPERATOR">>>=</SEQ>
  316.         <SEQ TYPE="OPERATOR">&&=</SEQ>
  317.         <SEQ TYPE="OPERATOR">||=</SEQ>
  318.         <SEQ TYPE="OPERATOR">^=</SEQ>
  319.         <SEQ TYPE="OPERATOR">x=</SEQ>
  320.         <SEQ TYPE="OPERATOR">>=</SEQ>
  321.         <SEQ TYPE="OPERATOR"><=</SEQ>
  322.         <SEQ TYPE="OPERATOR">></SEQ>
  323.         <SEQ TYPE="OPERATOR"><</SEQ>
  324.  
  325.         <!-- simple operators -->
  326.         <SEQ TYPE="OPERATOR">|</SEQ>
  327.         <SEQ TYPE="OPERATOR">&</SEQ>
  328.         <SEQ TYPE="OPERATOR">!</SEQ>
  329.         <SEQ TYPE="OPERATOR">=</SEQ>
  330.         <SEQ TYPE="OPERATOR">!</SEQ>
  331.         <SEQ TYPE="OPERATOR">+</SEQ>
  332.         <SEQ TYPE="OPERATOR">-</SEQ>
  333.         <SEQ TYPE="OPERATOR">/</SEQ>
  334.         <SEQ TYPE="OPERATOR">**</SEQ>
  335.         <SEQ TYPE="OPERATOR">*</SEQ>
  336.         <SEQ TYPE="OPERATOR">^</SEQ>
  337.         <SEQ TYPE="OPERATOR">~</SEQ>
  338.         <SEQ TYPE="OPERATOR">{</SEQ>
  339.         <SEQ TYPE="OPERATOR">}</SEQ>
  340.         <SEQ TYPE="OPERATOR">?</SEQ>
  341.         <SEQ TYPE="OPERATOR">:</SEQ>
  342.  
  343.         <!-- Keywords -->
  344.         <KEYWORDS>
  345.             <KEYWORD1>new</KEYWORD1>
  346.             <KEYWORD1>if</KEYWORD1>
  347.             <KEYWORD1>until</KEYWORD1>
  348.             <KEYWORD1>while</KEYWORD1>
  349.             <KEYWORD1>elsif</KEYWORD1>
  350.             <KEYWORD1>else</KEYWORD1>
  351.             <KEYWORD1>unless</KEYWORD1>
  352.             <KEYWORD1>for</KEYWORD1>
  353.             <KEYWORD1>foreach</KEYWORD1>
  354.             <KEYWORD1>BEGIN</KEYWORD1>
  355.             <KEYWORD1>END</KEYWORD1>
  356.  
  357.             <OPERATOR>cmp</OPERATOR>
  358.             <OPERATOR>eq</OPERATOR>
  359.             <OPERATOR>ne</OPERATOR>
  360.             <OPERATOR>le</OPERATOR>
  361.             <OPERATOR>ge</OPERATOR>
  362.             <OPERATOR>not</OPERATOR>
  363.             <OPERATOR>and</OPERATOR>
  364.             <OPERATOR>or</OPERATOR>
  365.             <OPERATOR>xor</OPERATOR>
  366.  
  367.             <!-- At least attempt to highlight 'x', although this misses some -->
  368.             <OPERATOR>x</OPERATOR>
  369.  
  370.             <!--
  371.                 The following function list was derived from the perlfunc man
  372.                 page, Perl version 5.00503
  373.  
  374.                 Certain keywords have been commented out where they appear more
  375.                 than once, and the y///, qx//, etc. functions have been removed,
  376.                 since they would are colorized not as keywords, but with separate
  377.                 rules.
  378.             -->
  379.  
  380.             <!-- Functions for SCALARs or strings -->
  381.             <KEYWORD3>chomp</KEYWORD3>
  382.             <KEYWORD3>chop</KEYWORD3>
  383.             <KEYWORD3>chr</KEYWORD3>
  384.             <KEYWORD3>crypt</KEYWORD3>
  385.             <KEYWORD3>hex</KEYWORD3>
  386.             <KEYWORD3>index</KEYWORD3>
  387.             <KEYWORD3>lc</KEYWORD3>
  388.             <KEYWORD3>lcfirst</KEYWORD3>
  389.             <KEYWORD3>length</KEYWORD3>
  390.             <KEYWORD3>oct</KEYWORD3>
  391.             <KEYWORD3>ord</KEYWORD3>
  392.             <KEYWORD3>pack</KEYWORD3>
  393.             <KEYWORD3>reverse</KEYWORD3>
  394.             <KEYWORD3>rindex</KEYWORD3>
  395.             <KEYWORD3>sprintf</KEYWORD3>
  396.             <KEYWORD3>substr</KEYWORD3>
  397.             <KEYWORD3>uc</KEYWORD3>
  398.             <KEYWORD3>ucfirst</KEYWORD3>
  399.  
  400.             <!-- Regular expressions and pattern matching -->
  401.             <KEYWORD3>pos</KEYWORD3>
  402.             <KEYWORD3>quotemeta</KEYWORD3>
  403.             <KEYWORD3>split</KEYWORD3>
  404.             <KEYWORD3>study</KEYWORD3>
  405.  
  406.             <!-- Numeric functions -->
  407.             <KEYWORD3>abs</KEYWORD3>
  408.             <KEYWORD3>atan2</KEYWORD3>
  409.             <KEYWORD3>cos</KEYWORD3>
  410.             <KEYWORD3>exp</KEYWORD3>
  411.             <!--<KEYWORD3>hex</KEYWORD3>-->
  412.             <KEYWORD3>int</KEYWORD3>
  413.             <KEYWORD3>log</KEYWORD3>
  414.             <!--<KEYWORD3>oct</KEYWORD3>-->
  415.             <KEYWORD3>rand</KEYWORD3>
  416.             <KEYWORD3>sin</KEYWORD3>
  417.             <KEYWORD3>sqrt</KEYWORD3>
  418.             <KEYWORD3>srand</KEYWORD3>
  419.  
  420.             <!-- Functions for real @ARRAYs -->
  421.             <KEYWORD3>pop</KEYWORD3>
  422.             <KEYWORD3>push</KEYWORD3>
  423.             <KEYWORD3>shift</KEYWORD3>
  424.             <KEYWORD3>splice</KEYWORD3>
  425.             <KEYWORD3>unshift</KEYWORD3>
  426.  
  427.             <!-- Functions for list data -->
  428.             <KEYWORD3>grep</KEYWORD3>
  429.             <KEYWORD3>join</KEYWORD3>
  430.             <KEYWORD3>map</KEYWORD3>
  431.             <!--<KEYWORD3>reverse</KEYWORD3>-->
  432.             <KEYWORD3>sort</KEYWORD3>
  433.             <KEYWORD3>unpack</KEYWORD3>
  434.  
  435.             <!-- Functions for real %HASHes -->
  436.             <KEYWORD3>delete</KEYWORD3>
  437.             <KEYWORD3>each</KEYWORD3>
  438.             <KEYWORD3>exists</KEYWORD3>
  439.             <KEYWORD3>keys</KEYWORD3>
  440.             <KEYWORD3>values</KEYWORD3>
  441.  
  442.             <!-- Input and output functions -->
  443.             <KEYWORD3>binmode</KEYWORD3>
  444.             <KEYWORD3>close</KEYWORD3>
  445.             <KEYWORD3>closedir</KEYWORD3>
  446.             <KEYWORD3>dbmclose</KEYWORD3>
  447.             <KEYWORD3>dbmopen</KEYWORD3>
  448.             <!--<KEYWORD3>die</KEYWORD3>-->
  449.             <KEYWORD3>eof</KEYWORD3>
  450.             <KEYWORD3>fileno</KEYWORD3>
  451.             <KEYWORD3>flock</KEYWORD3>
  452.             <KEYWORD3>format</KEYWORD3>
  453.             <KEYWORD3>getc</KEYWORD3>
  454.             <KEYWORD3>print</KEYWORD3>
  455.             <KEYWORD3>printf</KEYWORD3>
  456.             <KEYWORD3>read</KEYWORD3>
  457.             <KEYWORD3>readdir</KEYWORD3>
  458.             <KEYWORD3>rewinddir</KEYWORD3>
  459.             <KEYWORD3>say</KEYWORD3>
  460.             <KEYWORD3>seek</KEYWORD3>
  461.             <KEYWORD3>seekdir</KEYWORD3>
  462.             <KEYWORD3>select</KEYWORD3>
  463.             <KEYWORD3>syscall</KEYWORD3>
  464.             <KEYWORD3>sysread</KEYWORD3>
  465.             <KEYWORD3>sysseek</KEYWORD3>
  466.             <KEYWORD3>syswrite</KEYWORD3>
  467.             <KEYWORD3>tell</KEYWORD3>
  468.             <KEYWORD3>telldir</KEYWORD3>
  469.             <KEYWORD3>truncate</KEYWORD3>
  470.             <KEYWORD3>warn</KEYWORD3>
  471.             <KEYWORD3>write</KEYWORD3>
  472.  
  473.             <!-- Functions for fixed length data or records -->
  474.             <!--<KEYWORD3>pack</KEYWORD3>-->
  475.             <!--<KEYWORD3>read</KEYWORD3>-->
  476.             <!--<KEYWORD3>syscall</KEYWORD3>-->
  477.             <!--<KEYWORD3>sysread</KEYWORD3>-->
  478.             <!--<KEYWORD3>syswrite</KEYWORD3>-->
  479.             <!--<KEYWORD3>unpack</KEYWORD3>-->
  480.             <KEYWORD3>vec</KEYWORD3>
  481.  
  482.             <!-- Functions for filehandles, files, or directories -->
  483.             <KEYWORD3>chdir</KEYWORD3>
  484.             <KEYWORD3>chmod</KEYWORD3>
  485.             <KEYWORD3>chown</KEYWORD3>
  486.             <KEYWORD3>chroot</KEYWORD3>
  487.             <KEYWORD3>fcntl</KEYWORD3>
  488.             <KEYWORD3>glob</KEYWORD3>
  489.             <KEYWORD3>ioctl</KEYWORD3>
  490.             <KEYWORD3>link</KEYWORD3>
  491.             <KEYWORD3>lstat</KEYWORD3>
  492.             <KEYWORD3>mkdir</KEYWORD3>
  493.             <KEYWORD3>open</KEYWORD3>
  494.             <KEYWORD3>opendir</KEYWORD3>
  495.             <KEYWORD3>readlink</KEYWORD3>
  496.             <KEYWORD3>rename</KEYWORD3>
  497.             <KEYWORD3>rmdir</KEYWORD3>
  498.             <KEYWORD3>stat</KEYWORD3>
  499.             <KEYWORD3>symlink</KEYWORD3>
  500.             <KEYWORD3>umask</KEYWORD3>
  501.             <KEYWORD3>unlink</KEYWORD3>
  502.             <KEYWORD3>utime</KEYWORD3>
  503.  
  504.             <!-- Keywords related to the control flow of your perl program -->
  505.             <KEYWORD1>caller</KEYWORD1>
  506.             <KEYWORD1>continue</KEYWORD1>
  507.             <KEYWORD1>die</KEYWORD1>
  508.             <KEYWORD1>do</KEYWORD1>
  509.             <KEYWORD1>dump</KEYWORD1>
  510.             <KEYWORD1>eval</KEYWORD1>
  511.             <KEYWORD1>exit</KEYWORD1>
  512.             <KEYWORD1>goto</KEYWORD1>
  513.             <KEYWORD1>last</KEYWORD1>
  514.             <KEYWORD1>next</KEYWORD1>
  515.             <KEYWORD1>redo</KEYWORD1>
  516.             <KEYWORD1>return</KEYWORD1>
  517.             <KEYWORD1>wantarray</KEYWORD1>
  518.  
  519.             <!-- Keywords related to switch -->
  520.             <KEYWORD1>break</KEYWORD1>
  521.             <KEYWORD1>default</KEYWORD1>
  522.             <KEYWORD1>given</KEYWORD1>
  523.             <KEYWORD1>when</KEYWORD1>
  524.  
  525.             <!-- Keywords related to scoping -->
  526.             <!--<KEYWORD1>caller</KEYWORD1>-->
  527.             <!--<KEYWORD1>import</KEYWORD1>-->
  528.             <KEYWORD1>local</KEYWORD1>
  529.             <KEYWORD1>my</KEYWORD1>
  530.             <KEYWORD1>our</KEYWORD1>
  531.             <KEYWORD1>package</KEYWORD1>
  532.             <KEYWORD1>state</KEYWORD1>
  533.             <KEYWORD1>use</KEYWORD1>
  534.  
  535.             <!-- Miscellaneous functions -->
  536.             <KEYWORD3>defined</KEYWORD3>
  537.             <!--<KEYWORD3>dump</KEYWORD3>-->
  538.             <!--<KEYWORD3>eval</KEYWORD3>-->
  539.             <KEYWORD3>formline</KEYWORD3>
  540.             <!--<KEYWORD3>local</KEYWORD3>-->
  541.             <!--<KEYWORD3>my</KEYWORD3>-->
  542.             <KEYWORD3>reset</KEYWORD3>
  543.             <KEYWORD3>scalar</KEYWORD3>
  544.             <KEYWORD3>undef</KEYWORD3>
  545.             <!--<KEYWORD3>wantarray</KEYWORD3>-->
  546.  
  547.             <!-- Functions for processes and process groups -->
  548.             <KEYWORD3>alarm</KEYWORD3>
  549.             <KEYWORD3>exec</KEYWORD3>
  550.             <KEYWORD3>fork</KEYWORD3>
  551.             <KEYWORD3>getpgrp</KEYWORD3>
  552.             <KEYWORD3>getppid</KEYWORD3>
  553.             <KEYWORD3>getpriority</KEYWORD3>
  554.             <KEYWORD3>kill</KEYWORD3>
  555.             <KEYWORD3>pipe</KEYWORD3>
  556.             <KEYWORD3>setpgrp</KEYWORD3>
  557.             <KEYWORD3>setpriority</KEYWORD3>
  558.             <KEYWORD3>sleep</KEYWORD3>
  559.             <KEYWORD3>system</KEYWORD3>
  560.             <KEYWORD3>times</KEYWORD3>
  561.             <KEYWORD3>wait</KEYWORD3>
  562.             <KEYWORD3>waitpid</KEYWORD3>
  563.  
  564.             <!-- Keywords related to perl modules -->
  565.             <!--<KEYWORD1>do</KEYWORD1>-->
  566.             <KEYWORD1>import</KEYWORD1>
  567.             <KEYWORD1>no</KEYWORD1>
  568.             <!--<KEYWORD1>package</KEYWORD1>-->
  569.             <KEYWORD1>require</KEYWORD1>
  570.             <!--<KEYWORD1>use</KEYWORD1>-->
  571.  
  572.             <!-- Keywords related to classes and object-orientedness -->
  573.             <KEYWORD3>bless</KEYWORD3>
  574.             <!--<KEYWORD3>dbmclose</KEYWORD3>-->
  575.             <!--<KEYWORD3>dbmopen</KEYWORD3>-->
  576.             <!--<KEYWORD3>package</KEYWORD3>-->
  577.             <KEYWORD3>ref</KEYWORD3>
  578.             <KEYWORD3>tie</KEYWORD3>
  579.             <KEYWORD3>tied</KEYWORD3>
  580.             <KEYWORD3>untie</KEYWORD3>
  581.             <!--<KEYWORD3>use</KEYWORD3>-->
  582.  
  583.             <!-- Low-level socket functions -->
  584.             <KEYWORD3>accept</KEYWORD3>
  585.             <KEYWORD3>bind</KEYWORD3>
  586.             <KEYWORD3>connect</KEYWORD3>
  587.             <KEYWORD3>getpeername</KEYWORD3>
  588.             <KEYWORD3>getsockname</KEYWORD3>
  589.             <KEYWORD3>getsockopt</KEYWORD3>
  590.             <KEYWORD3>listen</KEYWORD3>
  591.             <KEYWORD3>recv</KEYWORD3>
  592.             <KEYWORD3>send</KEYWORD3>
  593.             <KEYWORD3>setsockopt</KEYWORD3>
  594.             <KEYWORD3>shutdown</KEYWORD3>
  595.             <KEYWORD3>socket</KEYWORD3>
  596.             <KEYWORD3>socketpair</KEYWORD3>
  597.  
  598.             <!-- System V interprocess communication functions -->
  599.             <KEYWORD3>msgctl</KEYWORD3>
  600.             <KEYWORD3>msgget</KEYWORD3>
  601.             <KEYWORD3>msgrcv</KEYWORD3>
  602.             <KEYWORD3>msgsnd</KEYWORD3>
  603.             <KEYWORD3>semctl</KEYWORD3>
  604.             <KEYWORD3>semget</KEYWORD3>
  605.  
  606.             <KEYWORD3>semop</KEYWORD3>
  607.             <KEYWORD3>shmctl</KEYWORD3>
  608.             <KEYWORD3>shmget</KEYWORD3>
  609.             <KEYWORD3>shmread</KEYWORD3>
  610.             <KEYWORD3>shmwrite</KEYWORD3>
  611.  
  612.             <!-- Fetching user and group info -->
  613.             <KEYWORD3>endgrent</KEYWORD3>
  614.             <KEYWORD3>endhostent</KEYWORD3>
  615.             <KEYWORD3>endnetent</KEYWORD3>
  616.             <KEYWORD3>endpwent</KEYWORD3>
  617.             <KEYWORD3>getgrent</KEYWORD3>
  618.             <KEYWORD3>getgrgid</KEYWORD3>
  619.             <KEYWORD3>getgrnam</KEYWORD3>
  620.             <KEYWORD3>getlogin</KEYWORD3>
  621.             <KEYWORD3>getpwent</KEYWORD3>
  622.             <KEYWORD3>getpwnam</KEYWORD3>
  623.             <KEYWORD3>getpwuid</KEYWORD3>
  624.             <KEYWORD3>setgrent</KEYWORD3>
  625.             <KEYWORD3>setpwent</KEYWORD3>
  626.  
  627.             <!-- Fetching network info -->
  628.             <KEYWORD3>endprotoent</KEYWORD3>
  629.             <KEYWORD3>endservent</KEYWORD3>
  630.             <KEYWORD3>gethostbyaddr</KEYWORD3>
  631.             <KEYWORD3>gethostbyname</KEYWORD3>
  632.             <KEYWORD3>gethostent</KEYWORD3>
  633.             <KEYWORD3>getnetbyaddr</KEYWORD3>
  634.             <KEYWORD3>getnetbyname</KEYWORD3>
  635.             <KEYWORD3>getnetent</KEYWORD3>
  636.             <KEYWORD3>getprotobyname</KEYWORD3>
  637.             <KEYWORD3>getprotobynumber</KEYWORD3>
  638.             <KEYWORD3>getprotoent</KEYWORD3>
  639.             <KEYWORD3>getservbyname</KEYWORD3>
  640.             <KEYWORD3>getservbyport</KEYWORD3>
  641.             <KEYWORD3>getservent</KEYWORD3>
  642.             <KEYWORD3>sethostent</KEYWORD3>
  643.             <KEYWORD3>setnetent</KEYWORD3>
  644.             <KEYWORD3>setprotoent</KEYWORD3>
  645.             <KEYWORD3>setservent</KEYWORD3>
  646.  
  647.             <!-- Time-related functions -->
  648.             <KEYWORD3>gmtime</KEYWORD3>
  649.             <KEYWORD3>localtime</KEYWORD3>
  650.             <KEYWORD3>time</KEYWORD3>
  651.             <!--<KEYWORD3>times</KEYWORD3>-->
  652.  
  653.             <FUNCTION>sub</FUNCTION>
  654.         </KEYWORDS>
  655.     </RULES>
  656.  
  657.     <RULES SET="POD" DEFAULT="COMMENT2">
  658.         <MARK_FOLLOWING TYPE="LABEL" AT_LINE_START="TRUE">=</MARK_FOLLOWING>
  659.     </RULES>
  660.  
  661.     <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
  662.         <!-- Variables inside a Literal -->
  663.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  664.             <BEGIN>${</BEGIN>
  665.             <END>}</END>
  666.         </SPAN>
  667.  
  668.         <!-- object method inside a Literal -->
  669.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  670.             <BEGIN>->{</BEGIN>
  671.             <END>}</END>
  672.         </SPAN>
  673.  
  674.         <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
  675.  
  676.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  677.             <BEGIN>@{</BEGIN>
  678.             <END>}</END>
  679.         </SPAN>
  680.  
  681.         <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
  682.  
  683.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  684.             <BEGIN>%{</BEGIN>
  685.             <END>}</END>
  686.         </SPAN>
  687.  
  688.         <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
  689.  
  690.         <SEQ TYPE="LITERAL1">|</SEQ>
  691.         <SEQ TYPE="LITERAL1">&</SEQ>
  692.         <SEQ TYPE="LITERAL1">!</SEQ>
  693.         <SEQ TYPE="LITERAL1">></SEQ>
  694.         <SEQ TYPE="LITERAL1"><</SEQ>
  695.         <SEQ TYPE="LITERAL1">)</SEQ>
  696.         <SEQ TYPE="LITERAL1">(</SEQ>
  697.         <SEQ TYPE="LITERAL1">=</SEQ>
  698.         <SEQ TYPE="LITERAL1">!</SEQ>
  699.         <SEQ TYPE="LITERAL1">+</SEQ>
  700.         <SEQ TYPE="LITERAL1">-</SEQ>
  701.         <SEQ TYPE="LITERAL1">/</SEQ>
  702.         <SEQ TYPE="LITERAL1">*</SEQ>
  703.         <SEQ TYPE="LITERAL1">^</SEQ>
  704.         <SEQ TYPE="LITERAL1">~</SEQ>
  705.         <SEQ TYPE="LITERAL1">}</SEQ>
  706.         <SEQ TYPE="LITERAL1">{</SEQ>
  707.         <SEQ TYPE="LITERAL1">.</SEQ>
  708.         <SEQ TYPE="LITERAL1">,</SEQ>
  709.         <SEQ TYPE="LITERAL1">;</SEQ>
  710.         <SEQ TYPE="LITERAL1">]</SEQ>
  711.         <SEQ TYPE="LITERAL1">[</SEQ>
  712.         <SEQ TYPE="LITERAL1">?</SEQ>
  713.         <SEQ TYPE="LITERAL1">:</SEQ>
  714.     </RULES>
  715.  
  716.     <!-- Literals framed by apostrophs -->
  717.     <RULES SET="APOSTR" DEFAULT="LITERAL1" ESCAPE="\">
  718.  
  719.         <!-- just a hack for sprintf -->
  720.         <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*\.?\d*[dfis]</SEQ_REGEXP>
  721.  
  722.     </RULES>
  723.  
  724.     <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
  725.         <!-- Comments -->
  726.         <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
  727.  
  728.         <!-- Variables -->
  729.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  730.             <BEGIN>${</BEGIN>
  731.             <END>}</END>
  732.         </SPAN>
  733.  
  734.         <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
  735.         <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
  736.  
  737.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  738.             <BEGIN>@{</BEGIN>
  739.             <END>}</END>
  740.         </SPAN>
  741.  
  742.         <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
  743.  
  744.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  745.             <BEGIN>%{</BEGIN>
  746.             <END>}</END>
  747.         </SPAN>
  748.  
  749.         <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
  750.     </RULES>
  751.  
  752.     <RULES SET="VARIABLE" DEFAULT="KEYWORD2" ESCAPE="\">
  753.          <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
  754.             <BEGIN>{</BEGIN>
  755.             <END>}</END>
  756.         </SPAN>
  757.  
  758.         <SEQ TYPE="OPERATOR">-></SEQ>
  759.     </RULES>
  760.  
  761.     <!-- Used for quote-like operators; just makes sure the brackets are balanced. -->
  762.     <RULES SET="QUOTED_BRACKET" DEFAULT="LITERAL1" ESCAPE="\">
  763.         <SPAN NO_LINE_BREAK="FALSE"
  764.                      TYPE="LITERAL1"
  765.                      MATCH_TYPE="OPERATOR"
  766.                      DELEGATE="QUOTED_BRACKET"
  767.                      HASH_CHARS="[">
  768.             <BEGIN>[</BEGIN>
  769.             <END>]</END>
  770.         </SPAN>
  771.     </RULES>
  772.     <RULES SET="QUOTED_BRACE" DEFAULT="LITERAL1" ESCAPE="\">
  773.         <SPAN NO_LINE_BREAK="FALSE"
  774.                      TYPE="LITERAL1"
  775.                      MATCH_TYPE="OPERATOR"
  776.                      DELEGATE="QUOTED_BRACE"
  777.                      HASH_CHARS="{">
  778.             <BEGIN>{</BEGIN>
  779.             <END>}</END>
  780.         </SPAN>
  781.     </RULES>
  782.     <RULES SET="QUOTED_PAREN" DEFAULT="LITERAL1" ESCAPE="\">
  783.         <SPAN NO_LINE_BREAK="FALSE"
  784.                      TYPE="LITERAL1"
  785.                      MATCH_TYPE="OPERATOR"
  786.                      DELEGATE="QUOTED_PAREN"
  787.                      HASH_CHARS="(">
  788.             <BEGIN>(</BEGIN>
  789.             <END>)</END>
  790.         </SPAN>
  791.     </RULES>
  792.  
  793. </MODE>
  794.